using System;
using System.Collections.Generic;
using System.Linq;
using Domain.Items;
using Domain.Repository;
using Infrastructure.Hibernate;
using NHibernate.Criterion;

namespace Database.Repository
{
    public class TaskRepository:BaseRepository<Task>, ITaskRepository
    {
        public TaskRepository(ISessionProvider sessionProvider) : base(sessionProvider)
        {
        }

        public IEnumerable<Task> GetFutureTasks()
        {
            return Session.CreateCriteria<Task>().List<Task>().Where(x=>x.LaunchTime>DateTime.Now);
        }
    }
}